package io.renren.modules.yckj.service;

import io.renren.common.service.CrudService;
import io.renren.modules.yckj.dto.AssetLogDTO;
import io.renren.modules.yckj.dto.InvoiceLogsDTO;
import io.renren.modules.yckj.dto.UserDTO;
import io.renren.modules.yckj.dto.api.LoginDTO;
import io.renren.modules.yckj.entity.UserEntity;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.Map;

/**
 * 用户表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2025-04-17
 */
public interface UserService extends CrudService<UserEntity, UserDTO> {

    UserEntity getByMobile(String mobile);

    UserEntity getUserByUserId(Long userId);

    /**
     * 用户登录
     *
     * @param dto 登录表单
     * @return 返回登录信息
     */
    Map<String, Object> login(LoginDTO dto);

    /**
     * 用户登录
     *
     * @param dto 登录表单
     * @return 返回登录信息
     */
    Map<String, Object> wxLogin(LoginDTO dto);

    String getUserPhone(String code) throws Exception;


    /**
     * 获取当前用户的可用余额
     *
     * @param userId 用户Id
     * @param teamId 组Id
     * @return 可用余额
     */
    Map<String, BigDecimal> getAvailableBalance(Long userId, Long teamId);

    Map<String, BigDecimal> getBalance(Long userId, Long teamId);

    boolean idCardVerification(String name, String idNo);

    String sendTemplateMsg(String openId,
                           String machineName,
                           String startTime,
                           String endTime,
                           String projectName,
                           String phone) throws IOException;

    String getTags() throws IOException;

    String getTagUsers() throws IOException;
}